package com.itcat.service.impl;/*
 * @Author: gonhsl
 * @Date:2022-04-04-13:24
 * */

import com.itcat.api.mysql.SmsFlashPromotionProductRelationApi;
import com.itcat.mysql.pojo.SmsFlashPromotionProductRelation;
import com.itcat.mysql.vo.SmsFlashPromotionProductRelationVo;
import com.itcat.service.SmsFlashPromotionProductRelationService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SmsFlashPromotionProductRelationServiceImpl implements SmsFlashPromotionProductRelationService {
    @DubboReference
    private SmsFlashPromotionProductRelationApi smsFlashPromotionProductRelationApi;
    @Override
    public List<SmsFlashPromotionProductRelationVo> list(Integer pageNum, Integer pageSize, Integer flashPromotionId, Integer flashPromotionSessionId) {
     return   smsFlashPromotionProductRelationApi.list(pageNum,pageSize,flashPromotionId,flashPromotionSessionId);

    }

    @Override
    public void create(List<SmsFlashPromotionProductRelation> relationList) {
      smsFlashPromotionProductRelationApi.create(relationList);
    }

    @Override
    public void delete(Integer id) {
        smsFlashPromotionProductRelationApi.delete(id);
    }

    @Override
    public void update(Integer id, SmsFlashPromotionProductRelation relation) {
       smsFlashPromotionProductRelationApi.update(id,relation);
    }

    @Override
    public SmsFlashPromotionProductRelation findOne(Integer id) {
       return smsFlashPromotionProductRelationApi.findOne(id);
    }
}
